package com.whminwei.edu.api.school.client;

import com.whminwei.common.feign.decoder.FullHttpRspnConfig;
import com.whminwei.common.http.rspn.BaseHttpResponse;
import com.whminwei.common.http.rspn.FullHttpResponse;
import com.whminwei.edu.api.school.dto.feq.TeacherBaseFeq;
import com.whminwei.edu.api.school.dto.feq.UserAccountFeq;
import com.whminwei.edu.api.school.dto.fspn.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author wangy
 * @since 2024/3/14
 */
@FeignClient(name = "xzzg-pt-school-service", contextId = "staff-info", configuration = FullHttpRspnConfig.class)
public interface StaffClient {
    /**
     * 查询教职工列表
     *
     * @return com.whminwei.common.http.rspn.FullHttpResponse<com.whminwei.edu.api.school.dto.fspn.StaffFspn>
     * @author wangy
     * @since 9:25 2024/4/19
     **/
    @PostMapping("/staff/getStaffList")
    FullHttpResponse<StaffFspn> getStaffList();

    /**
     * 通过账号获取教职工信息
     * sso使用此接口获取教职工信息
     *
     * @param req 请求参数
     * @return com.whminwei.common.http.rspn.FullHttpResponse<com.whminwei.edu.api.school.dto.fspn.UserFspn>
     * @author wangy
     * @since 10:44 2024/4/19
     **/
    @PostMapping("/staff/getStaffByAccount")
    FullHttpResponse<UserFspn> getStaffByAccount(@RequestBody @Validated UserAccountFeq req);

    /**
     * 通过账号获取教职工信息
     * sso使用此接口获取教职工信息
     * @return com.whminwei.common.http.rspn.FullHttpResponse<com.whminwei.edu.api.school.dto.fspn.UserFspn>
     * @author wangy
     * @since 10:44 2024/4/19
     **/
    @PostMapping("/staff/refreshAccount")
    FullHttpResponse<UserListFspn> refreshAccount();

    /**
     * FIXME
     *
     * 通过ID获取教职工信息
     */
    @PostMapping("/staff/getStaffListById")
    FullHttpResponse<StaffFspn> getStaffListById(List<String> staffIds);

    /**
     * 查询所有教师信息
     *
     * @return com.whminwei.common.http.rspn.FullHttpResponse<com.whminwei.edu.api.school.dto.fspn.StaffFspn>
     * @author zhangjq
     * @since 2024-05-30
     */
    @PostMapping("/staff/getTeacherList")
    FullHttpResponse<TeacherFspn> getTeacherList();


    /**
     * 获取所有教师详情信息列表
     *
     * @return FullHttpResponse<TeacherDetailFspn>
     * @author zhangzf
     * @since 2024/7/3
     */
    @PostMapping("/staff/getTeacherDetailList")
    FullHttpResponse<TeacherDetailFspn> getTeacherDetailList();

    /**
     * 更新教师部分基础信息
     *
     * @param req TeacherBaseReq
     * @return BaseHttpResponse
     * @author zhangzf
     * @since 2024/7/8
     */
    @PostMapping("/staff/uptTeacherBase")
    BaseHttpResponse uptTeacherBase(@RequestBody @Validated TeacherBaseFeq req);

}
